//加载完成并触发	window 窗口	load 等待
window.onload = function(){
	//绑定一个键盘事件，匿名函数
	document.getElementById("ipt").onkeyup = function(){
		var length = this.value.length;
		document.getElementById("info").innerHTML = length;
		if(length == 0){
			document.getElementById("info").innerHTML = " ";
		}
		else if(length < 5){
			document.getElementById("info").innerHTML = "(太少了！笨蛋！)";
			document.getElementById("info").style.color = "red";
		}
		else if(length >= 5 && length <= 10){
			document.getElementById("info").innerHTML = "(刚刚好啊老铁！)";
		}
		else if(length > 10){
			document.getElementById("info").innerHTML = "(超过太多了啊！)";
		}
	}
}
